<?php

namespace app\model;

use think\Model;

class TrademarkdynamicRecoverModel extends Model
{

    protected $connection = 'mysql';

    protected $pk = 'id';

    protected $name = 'trademark_dynamic_recover';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'create_time';
    public function getCreateTimeTextAttr($value,$data)
    {
        if(isset($data['create_time'])){
            $value  = date('Y-m-d H:i:s',$data['create_time']);
        }
        return $value;
    }
}
